<?php
      
     $from_server=$_POST['from_server'];
	 $id=$_POST['id'];
	 $from_email=$_POST['from_email'];
	 $pass=$_POST["pass"];
	 $cesi_email=$_POST["cesi_email"];
	 
	 $connect=mysql_connect("localhost","root","192510");
	 mysql_select_db("news",$connect);
	 
	
		   
   if($id==null){
	   
	   $sql="insert into email_new(from_server,from_email,pass,cesi_email) value('$from_server','$from_email','$pass','$cesi_email')";
	   mysql_query($sql);
	   
   }else{
	   
	       $sql="update email_new set from_server='$from_server',from_email='$from_email',pass='$pass',cesi_email='$cesi_email' where id=$id";
		   mysql_query($sql);
	 
	   
	   
   }
		   
		   
		
	 //查询数据
/* 	 $sql2="select * from email_new where  from_email ='". $from_email ."'";
	 $result=mysql_query($sql2);
	 $row=mysql_fetch_assoc($result);
	 echo json_encode($row); */
	
?>